CC = gcc
CPPFLAGS = -g -Wall -DHAVE_CONFIG_H
LINKFLAGS = -dynamiclib -current_version 1.0 
INC_FILES = =I./

.DEFAULT : libev

SRC_FILES += ev.c event.c
OBJS    := $(patsubst %.c,%.o,$(SRC_FILES))
libev :$(OBJS)
	@echo "build libev"
	$(CC) $(LINKFLAGS) -o $@.dylib $(OBJS)

$%.o: %.cpp
	$(call mkdirs,$@)
	$(CC) $(CPPFLAGS) $(INC_FILES)  -c $^ -o $@

.PHONY:clean debug
debug:
	@echo "OBJS: " $(OBJS)
clean:
	rm -rf *.o
	rm -rf *.so
